home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-06 / an112x.zip / ACCT.H next >
Text File  |  1991-11-12  |  2KB  |  98 lines

  1. #include <prolog.h>
  2.  
  3. #define CHARGE_RECORD            1
  4. #define NOTE_RECORD            2
  5.  
  6. #define CONNECT_TIME_CHARGE_NOTE    1
  7. #define DISK_STORAGE_CHARGE_NOTE    2
  8. #define LOGIN_NOTE            3
  9. #define LOGOUT_NOTE            4
  10. #define ACCOUNT_LOCKED_NOTE        5
  11. #define SERVER_TIME_MODIFIED_NOTE    6
  12.  
  13. typedef struct CONNECT_TIME_CHARGE {
  14.     LONG    connectTime;
  15.     LONG    requestCount;
  16.     WORD    bytesReadHi;
  17.     WORD    bytesRead2;
  18.     WORD    bytesReadLo;
  19.     WORD    bytesWrittenHi;
  20.     WORD    bytesWritten2;
  21.     WORD    bytesWrittenLo;
  22. } CONNECT_TIME_CHARGE;
  23.  
  24. typedef struct DISK_STORAGE_CHARGE {
  25.     LONG    blocksOwned;
  26.     LONG    numberOfHalfHours;
  27. } DISK_STORAGE_CHARGE;
  28.  
  29. typedef struct UNKNOWN_CHARGE {
  30.     BYTE    comment;
  31. } UNKNOWN_CHARGE;
  32.  
  33. typedef struct {
  34.     LONG    amount;
  35.     WORD    chargeType;
  36.     union CHARGE_COMMENT {
  37.         struct CONNECT_TIME_CHARGE    connectTimeCharge;
  38.         struct DISK_STORAGE_CHARGE    diskStorageTimeCharge;
  39.         struct UNKNOWN_CHARGE        unknownCharge;
  40.     } chargeComment;
  41. } CHARGE_RECORD_STRUCT;
  42.  
  43. typedef struct LOGIN_NOTE_STRUCT {
  44.     LONG    net;
  45.     LONG    nodeHigh;
  46.     WORD    nodeLow;
  47. } LOGIN_NOTE_STRUCT;
  48.  
  49. typedef struct LOGOUT_NOTE_STRUCT {
  50.     LONG    net;
  51.     LONG    nodeHigh;
  52.     WORD    nodeLow;
  53. } LOGOUT_NOTE_STRUCT;
  54.  
  55. typedef struct SERVER_TIME_MOD_STRUCT {
  56.     BYTE    year;
  57.     BYTE    month;
  58.     BYTE    day;
  59.     BYTE    hour;
  60.     BYTE    minute;
  61.     BYTE    second;
  62. } SERVER_TIME_MOD_STRUCT;
  63.  
  64. typedef struct ACCOUNT_LOCKED_STRUCT {
  65.     LONG    net;
  66.     LONG    nodeHigh;
  67.     WORD    nodeLow;
  68. } ACCOUNT_LOCKED_STRUCT;
  69.  
  70. typedef struct UNKNOWN_NOTE_STRUCT {
  71.     BYTE    comment;
  72. } UNKNOWN_NOTE_STRUCT;
  73.  
  74. typedef struct {
  75.     WORD    noteType;
  76.     union NOTE_COMMENT {
  77.         struct LOGIN_NOTE_STRUCT    loginNote;
  78.         struct LOGOUT_NOTE_STRUCT    logoutNote;
  79.         struct SERVER_TIME_MOD_STRUCT    serverTimeNote;
  80.         struct ACCOUNT_LOCKED_STRUCT    accountLockedNote;
  81.         struct UNKNOWN_NOTE_STRUCT    unknownNote;
  82.     } noteComment;
  83. } NOTE_RECORD_STRUCT;
  84.  
  85. typedef struct {
  86.     WORD    length;
  87.     LONG    serverID;
  88.     BYTE    timeStamp[6];
  89.     BYTE    recordType;
  90.     BYTE    completionCode;    /* if record is a note, this field is reserved */
  91.     WORD    serviceType;
  92.     LONG    clientID;
  93.     union CHARGE_OR_NOTE {
  94.         CHARGE_RECORD_STRUCT    charge;
  95.         NOTE_RECORD_STRUCT    note;
  96.     } chargeOrNote;
  97. } ACCT_RECORD;
  98.